phy_dynamic

Returns whether the instance is dynamic or not.

语法:

phy_dynamic;


返回: 布尔值


描述

A dynamic instance is one that is fully simulated within the physics world and this read-only variable will return true if the instance being checked is fully simulated or false if it is not.


例如:

if other.phy_dynamic
   {
   with (other)
      {
      var dir;
      dir = point_direction(x, y, other.x, other.y);
      physics_apply_impulse(x, y, x + lengthdir_x(100, dir), y + lengthdir_y(100, dir));
      }
   }

The above code creates a new instance and then defines it as being a "bullet" in the physics world before giving it a massive impulse along the y axis.


上一页: Physics Variables
next: phy_kinematic
© Copyright YoYo Games Ltd. 2018 All Rights Reserved